Skip to content

Pitfall: a pooled realloc that copies the old size overwrites the pool when shrinking - #62

Open
WDrijver wants to merge 1 commit into
mainfrom
pitfall/pooled-realloc-shrink
Open

WDrijver wants to merge 1 commit into
mainfrom
pitfall/pooled-realloc-shrink

Conversation

@WDrijver

Copy link
Copy Markdown
Contributor

New pitfall os/pitfalls/pooled-realloc-shrink-overwrites-pool.md (status draft, owner WDrijver).

Found during ApolloOS R10 testing on a V4 (2026-11-18): System/FTManager raised alert 0x0100000F "Memory header not located" (PC in exec's PoolManagerAlert) within 5 s of every start. The cause was the AROS port of FreeType 2.10 (builds/aros/src/base/ftsystem.c): ft_realloc copied the old block size also when FreeType shrinks a block, overwriting the next pool chunk header. Fixed in ApolloOS-Port commit aac8859; on the V4 FTManager then scans the 74 TrueType fonts, quits cleanly and freetype2.library expunges.

The file covers the general mistake (any realloc wrapper over exec memory in ported code) and how to recognise it from the alert.

Checks run locally: check_frontmatter.py OK, check_links.py OK.

🤖 Generated with Claude Code

…l when shrinking

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WDrijver
WDrijver requested a review from TuKo1982 as a code owner November 18, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant